<?php
/**
 * Created by PhpStorm.
 * User: Raytine
 * Date: 2020/1/14
 * Time: 13:13
 */

namespace App\Admin\Controllers;
use App\Http\Controllers\Controller;
use App\model\UserDepartment;
use Encore\Admin\Controllers\HasResourceActions;
use Encore\Admin\Controllers\ModelForm;
use Encore\Admin\Form;
use Encore\Admin\Grid;
use Encore\Admin\Layout\Content;
use Encore\Admin\Show;

class UserDeparmentController
{
    use ModelForm;
    public function index()
    {
        return \Admin::content(function (Content $content) {
            $content->header('用户部门');
            $content->body(UserDepartment::tree());
        });
    }
}